<template>
  <div id="my-circle-meun">

    <circle-menu @click.native='fixclick' ref="menu" type="top" :number='3' animate="animated jello" mask="black" circle btn>
      <a slot="item_1" @click="go('credential')" class="fa fa-id-badge  fa-lg">

        <p class="yellow">证书下载</p>
      </a>

      <a slot="item_2" @click="go('report')" class="fa fa-search fa-lg">

        <p class="purple">成绩查询</p>
      </a>

      <a slot="item_3" @click="go('query')" class="fa fa-id-card-o fa-lg">

        <p class="green">报名查询</p>
      </a>

    </circle-menu>

  </div>
</template>


<script type="text/ecmascript-6">
/* eslint-disable*/
import {
  FormPreview,
  Cell,
  CellBox,
  CellFormPreview,
  Group,
  Badge,
  XButton,
  Confirm,
  ConfirmPlugin,
  XInput,
  PopupPicker,
  Timeline,
  TimelineItem,
  Actionsheet,
  TransferDomDirective as TransferDom
} from "vux";

import CircleMenu from "vue-circle-menu";
import { myApply } from "@/api/myapply.js";
import { getForm } from "@/api/getForm.js";
import { sendPay } from "@/api/sendPay.js";
import { refund } from "@/api/refund.js";
import { orderQuery } from "@/api/orderQuery.js";
import { indexedDB } from "@/api/indexedDB.js";
import { enCountryData } from "@/common/locales/enCountryData1.js";
import { countryData } from "@/common/locales/countryData1.js";
import { cityData } from "@/common/locales/cityData.js";
let mycountryData;
if (document.querySelector("html").lang == "en") {
  mycountryData = enCountryData;
} else {
  mycountryData = countryData;
}

import { cookie } from "vux";

import Bus from "@/common/js/bus.js";

import Vue from "vue";
import axios from "axios";
import VueAxios from "vue-axios";
// import qs from 'qs'
Vue.use(VueAxios, axios);
Vue.use(ConfirmPlugin);

export default {
  props: {},
  data() {
    return {
      raceID: ''
    };
  },
  created() {},
  mounted() {
    var _this = this;
    //console.log(window.localStorage.getItem('raceId'))
    Bus.$on("raceId", e => {
      _this.raceID = e;
      //window.localStorage.getItem
    });
  },
  methods: {
    go(link) {
      //console.log(this.raceID);
      cookie.remove('idnum')
      this.$router.push(`/${link}?race_id=${window.localStorage.getItem('raceId')}`);
    },
    fixclick() {
      //console.log()

      if (this.$refs.menu.open == true) {
        this.$refs.menu.$el.style.overflow = "initial";
      } else {
        this.$refs.menu.$el.style.overflow = "hidden";
      }
    }
  },
  components: {
    CircleMenu,
    PopupPicker,
    FormPreview,
    Cell,
    CellBox,
    CellFormPreview,
    Group,
    Badge,
    XButton,
    Confirm,
    XInput,
    Timeline,
    Actionsheet,
    TimelineItem
  },
  directives: {
    TransferDom
  }
};
</script>


<style lang="less" rel="stylesheet/less">
#my-circle-meun {
  position: fixed;
  left: 18px;
  bottom: 56px;
  z-index: 99;
  .oy-menu-btn {
    width: 30px;
    height: 30px;
    line-height: 50px;
    display: inline-block;
    border: none;
    text-align: center;
    position: relative;
  }
}

#my-circle-meun nav li {
  position: absolute;
  top: 0;
}

#my-circle-meun #CircleMenu {
  overflow: hidden;
  p {
    line-height: 0;
  }
}

#my-circle-meun .fa {
  color: #fff;
}

#my-circle-meun #CircleMenu .oy-menu-btn {
  line-height: 0;
}

#my-circle-meun #CircleMenu .oy-menu-item {
  line-height: 50px;
  left: -10px;
}

#my-circle-meun #CircleMenu .iconfont {
  font-size: 24px;
}

#my-circle-meun #CircleMenu p {
  position: absolute;
  height: 0px;
  left: 60px;
  top: 10px;
  padding: 15px;
  text-align: left;
  display: block;
  white-space: pre;
  border-radius: 10px;
  font-size: 16px;
}

#my-circle-meun #CircleMenu p.yellow:before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #ffa000;
  border-bottom: 10px solid transparent;
  position: absolute;
  left: -7px;
  top: 5px;
}

#my-circle-meun #CircleMenu p.purple:before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #8e24aa;
  border-bottom: 10px solid transparent;
  position: absolute;
  left: -7px;
  top: 5px;
}

#my-circle-meun #CircleMenu p.green:before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #00e676;
  border-bottom: 10px solid transparent;
  position: absolute;
  left: -7px;
  top: 5px;
}

#my-circle-meun #CircleMenu p.blue:before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #40c4ff;
  border-bottom: 10px solid transparent;
  position: absolute;
  left: -7px;
  top: 5px;
}
</style>



